-- card: 3746 from stack: in.0 -- bmap block id: 2154 -- flags: 4000 -- background id: 2582 -- name: Help ----- HyperTalk script ----- on closeCard set scroll of card field "Help/Info Text" to 0 end closeCard -- part 4 (button) -- low flags: 00 -- high flags: A004 -- rect: left=339 top=279 right=336 bottom=396 -- title width / last selected line: 0 -- icon id / first selected line: 1000 / 1000 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Update ----- HyperTalk script ----- on mouseUp answer "Really update (see help)?" with "Ok" or "Cancel" if it is "Ok" then put second word of the long name of this stack into tcs put char 2 to (length(tcs)-1) of tcs into tcs lock screen push card doMenu "Open Stack..." put second word of the long name of this stack into ocs put char 2 to (length(ocs)-1) of ocs into ocs if ocs = tcs then pop card unlock screen exit mouseUp end if repeat with num = 1 to the number of cards in background "Main" set cursor to busy go to card num of background "Main" of stack ocs set cursor to busy put field "Label" into a put field "Box" into b put field "Name" into c put field "Free" into d put field "Size" into e put field "Date" into f put field "Catalog" into g set cursor to busy go to last card of background "Main" of stack tcs doMenu "New Card" set cursor to busy put a into field "Label" put b into field "Box" put c into field "Name" put d into field "Free" put e into field "Size" put f into field "Date" put g into field "Catalog" end repeat pop card set cursor to hand unlock screen end if end mouseUp -- part 1 (button) -- low flags: 00 -- high flags: 2004 -- rect: left=394 top=279 right=336 bottom=451 -- title width / last selected line: 0 -- icon id / first selected line: 20098 / 20098 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Home ----- HyperTalk script ----- on mouseUp if the commandkey is up then go home else doMenu "Open Stack..." end if end mouseUp -- part 2 (button) -- low flags: 00 -- high flags: 2004 -- rect: left=449 top=279 right=336 bottom=506 -- title width / last selected line: 0 -- icon id / first selected line: 29114 / 29114 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Return ----- HyperTalk script ----- on mouseUp set scroll of card field "Help/Info Text" to 0 pop card end mouseUp -- part 3 (field) -- low flags: 01 -- high flags: 2007 -- rect: left=5 top=39 right=273 bottom=505 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: Help/Info Text -- part contents for card part 3 ----- text ----- The CatStuff Stack v2.0 by John B. Lockhart Requires This stack was written on a Macintosh IIcx under System 6.0.4 (with the included version of HyperCard). It should run on most systems under the latest version of the System. If you attempt to run it on a Lisa or without HFS, don’t expect it to work. I take no responsibility if this stack lays waste to your disks or system; you should use good sense and try it out on write-protected or expendable disks first. (Hey! It’s free! Stop grumbling!) For best results, have the Geneva 9 point font (required) and the Monaco 9 point font (optional?) in your System file. What’s New in Version 2.0 Version 2.0 supports Compactor files. If you’re screaming that you don’t want to use Version 2.0 because you’ve read 50 disks into Version 1.0 and don’t feel like re-cataloging them, I don’t blame you. Look below this text. There is a new button called “Update,” expressly for the purpose of copying your disk info from CatStuff Version 1.0 to this stack. Simply click on Update, select your old CatStuff stack, and wait a few days. It may be slow, but it beats re-cataloging 50 disks. The Update button copies all of your old cards into new cards in this stack, so make sure that (a) you’ve got lots of room on whatever disk you’re working and (b) that you select the CatStuff Version 1.0 stack, lest it try to copy the phone number of your business contact in Guam from the Address stack into this stack. Afterwards you can delete Version 1.0. Description/How to Use CatStuff is a stack designed to keep track of all the files on all of your floppy disks. Like many others of its kind, CatStuff has the ability to read a disk catalog directly into HyperCard from a recently inserted disk. The principal difference between CatStuff and other stacks similar to it is that CatStuff treats StuffIt and Compactor archive files as folders: Everything within a StuffIt or Compactor file on a disk is listed in the catalog, including multiple sub-folders. (Compactor auto-extracting applications are also expanded.) The CatStuff data card contains several fields and buttons to contain and manipulate the information stored in the stack. All fields in the stack are filled for you except for the Disk Box and Disk Label fields, which you may fill with the name of the disk box the disk is in and its label (see the Disk Labeling section). Please note that the Disk Size field is only accurate within several K of the actual disk size. The Free Space field is accurate to within one K of the actual amount of free space on the volume. The most important button is the New Card button. This button creates a new card, then prompts you to insert a disk. If a disk is in the external drive or internal drive (in that order), it is ejected. Remember also that Command-Shift-1 and Command-Shift-2 eject disks as always, should you want to remove a disk before the read procedure. After the disk is read, the various fields in the card are filled with information from the disk. Command-clicking on the New Card button will allow multiple-disk reads; after each disk is read, a new card is created and you are prompted to insert a disk. The multiple-read function prompts you for the disk box name, as well as whether you’d like to number the disk labels (and from what starting number) or enter them yourself. The Read Disk button is similar to the New Card button, but overwrites information on the existing card instead of creating a new card. The Sort button allows you to sort by certain fields; when sorting by the Label field you will be given further options, discussed below. The Find button allows you to search the various cards in various ways. Note: To repeat searching, simply use RETURN after the first instance of what you’re searching for has been found, just as you normally would with the HyperCard find command. Eventually CatStuff will tell you no more instances can be found. The Delete Card option is obvious enough, but if you Command-click on it, it will ask if you wish to remove all cards from the stack. This is dangerous, but allows you to start over with a clean slate. Please do this to the stack if you give a copy to a friend after loading it with your own files; it reduces stack size enormously. The Home button will launch another stack if Command-clicked; otherwise it takes you to the home stack. Disk Labeling If you’re like me, then you have about 100 disks labeled “Misc,” and were serious when you labeled them. In The Search for the Better Way I have found a method which works: Label each “Misc” disk in a box sequentially with a number and then use this stack, placing the number on the label in the Disk Label field. When you’re looking for a file, simply search for it by name in the stack, cross-reference with the number, then flip to that number in your disk box. The sort button allows you to sort both numerically and alphabetically for this purpose. (Some of you might want to letter your disks...) The Catalog Field The catalog field displays each file on the disk in alphabetical order, with the associated file type and creator strings, and each files’ size in K (rounded up; a 7-byte file is shown as 1K). If a filename, type, or creator string contains control characters, they are replaced with bullets. If a subdirectory or StuffIt/Compactor file is encountered, all of the files within that directory or file are listed again in alphabetical order, but indented one space. Directories are indicated by the text “Directory” where the file type/creator columns are. Directories within StuffIt/Compactor files are treated identically to normal directories. Archive files within archive files are merely listed; to show files within them would require the program to unpack the file, which is unreasonable. (It isn’t a good idea to keep archive files within archive files anyway—it wastes space and makes life difficult.) Reasons for This Stack 1. Like I said, I’ve got 100 disks labeled “Misc.” 2. If you’ve looked at the other stacks, you’ll notice that not one has the option to catalog StuffIt/Compactor archives. My 100 disks are littered with StuffIt archives (try to find a Mac BBS which DOESN’T use StuffIt), and the other stacks just don’t help when they list one lonely file on the disk, such as “Misc. programs” (a StuffIt archive), which may be filled with fifty files. 3. Another gripe of mine about many other stacks is that they use multiple fields for the catalog data. While this allows you to have a nice proportionally spaced font, it also means you have to scroll all of those fields at the same time. This is SLOW. Very slow. Which is not their fault (right Bill?), but is nevertheless irritating. I use only one field with a monospaced font to keep nice columns, and the scrolling rate is much more tolerable. (Users for turbo-intercooled HyperTalk!) 4. I wanted to write an XFCN. (“What??”) Ok, I wanted to HAVE my own XFCN. I’ve seen one too many stack which uses Oscar F. Hills’ ReadCat XCMD. This is not to say that his XCMD isn’t good (It inspired me to write this!), but he DID write a cataloging stack to go along with HIS XCMD, and other stacks offering “improvements” should have worked on the XCMD itself, the heart of the matter. Credits I must give sincere thanks to Rob Gibson, author of the excellent WhereSIT program (get it, it really is useful). While I was writing the CatStuff XFCN, it occured to me that I honestly didn’t know how a StuffIt file was encoded. It was then I recalled that the author of WhereSIT would HAVE to know how they were encoded, so I looked him up and sent him e-mail (Raymond Lau is unavailable electronically, to the best of my knowledge.). To my surprise (a) the NEXT DAY I received a letter from him, explaining that (b) the StuffIt format was outlined in the StuffIt documentation (Which I didn’t have or hadn’t read. Honest!), and (c) accompanied by that section of the documentation. Within a day I’d added that to my XFCN. Further thanks to Bill Goodman, author of Compactor. I downloaded Compactor and noted that it packed more efficiently and quickly than StuffIt, so I wanted to have CatStuff support Compactor files. I immediately wrote the author, and again was surprised to get a response the next day containing the specs. for the Compactor file format. CatStuff version 2.0 was the result. I highly recommend Compactor; I was impressed by virtually everything about it, especially the fact that the distribution package (which unpacked itself!) was SMALLER than the simple (non-unpacking) StuffIt archive containing the same files. Thanks also goes to Raymond Lau for (the virtually standardized) StuffIt. While I’m dishing out thanks, I cannot fail to mention Oscar F. Hills again, the man who started it all (to my knowledge) with AutoCat. Freeware Yes, this stack is freeware. You may distribute it freely. Freely. Don’t even ask 5 and a half cents for it. Or I’ll sue you for ownership rights of your firstborn. You may also use my CatStuff XFCN in other stacks (sigh), but for heaven’s sake do IMPROVE on this stack if you do. Or write your own XFCN. In doing so you’ll realize why people like me are so protective over their XFCNs. They can truly be a pain to write. In any case, you’ll note that I’ve plastered my name over the XFCN window, so you’re forced to give me credit (as you should), wittingly or no. This stack and its accompanying XFCN are Copyright © 1990. The CatStuff XFCN The CatStuff XFCN is very simple to use. It takes no parameters, and returns a block of text containing the catalog if successful. The first line of the block of text indicates the result of the operation; if it is not “OK” then the catalog information is not returned. If it is “OK,” then the next line contains the name of the volume. The third line contains the size of the volume and free space on it in K, separated by commas. The remainder of the text block is the disk catalog. Look at the script of the “Read Disk” button for an example on how to use the XFCN. Note that there are NO associated resources with my XFCN; it is therefore only necessary to copy the XFCN itself to your stack to use it. Version History Version 2.0: Added Compactor archive/auto-extracting file support. Added “Update” button in help (below). Improved number handling in the XCMD (file sizes/free space are rounded to the next highest K). Added auto-pre-ejecting of disks to XCMD. Fixed bugs in and cleaned up the custom find routine. Added a little color to the XFCN window (oooh-ahhh). Version 1.0: The first release; only StuffIt files supported. Future Versions? With any piece of software, inevitably, something (a) will be wrong, (b) can be done better, or (c) has been left out. I catch many things, but not everything. And I don’t know if hundreds of people out there want pictures of pink elephants floating around their disk catalog stacks. The point is, write me mail. I’ll give what you say thought and I’m certain to reply (failing acts of God, pink elephants stomping about my condo, et cetera). Contacting Me I can be contacted at: J.LOCKHART1 on GEnie, and gt1439a@prism.gatech.edu on the InterNet. Please note that CompuServe users CAN send mail to me at the InterNet address by prefixing the latter with “>INTERNET:” (>INTERNET:gt1439a@prism.gatech.edu). Enjoy!